#!/bin/bash
#========================================================================
# Author: YSLin
# Email: 
# File Name: redirect_pipe.sh
# Description: 
#   
# Edit History: 
#   2011-02-23    File created.
#========================================================================

#redirect
ps | awk '{ print $1 > "pid-list"
       print $4 > "cmd-list" }' 

#pipe
ps | awk '{ print $1 > "pid.unsorted"
       print $1 | "sort -r > pid.sorted" }' 
